﻿<UserControl x:Class="Silverlight.Sample.DoughnutType"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
             xmlns:eternal="clr-namespace:Eternal.DataVisualization;assembly=Eternal.DataVisualization.Silverlight"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Grid.Loaded">
                <BeginStoryboard>
                    <Storyboard >
                        <DoubleAnimation From="0" To="1" Storyboard.TargetName="Chart" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"></DoubleAnimation>
                        <DoubleAnimation  From="0" To="1" Storyboard.TargetName="Chart" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"></DoubleAnimation>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Grid.Triggers>
        <eternal:AccumulativeChart  x:Name="Chart" RenderTransformOrigin="0.5, 0.5">
            <eternal:AccumulativeChart.RenderTransform>
                <ScaleTransform ></ScaleTransform>
            </eternal:AccumulativeChart.RenderTransform>
            <eternal:DoughnutSeries ItemsSource="{Binding Datas}" PrimaryPath="Name" SecondaryPath="Value">
              
                <eternal:DoughnutSeries.Label>
                    <eternal:ChartLabel/>
                </eternal:DoughnutSeries.Label>
            </eternal:DoughnutSeries>
        </eternal:AccumulativeChart>
    </Grid>
</UserControl>
